<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>style-media</title>
    <style type="text/css">
        h1{color: #ff0000;}
        p{color: #0000ff;}
        body{background-color: #ffef99;}
    </style>
    <style type="text/css" media="print">
        h1{
            color: #000000;}
        p{
            color: #000000;}
        body{background-color: #ffffff}
    </style>
</head>
<body>
<h1>一个标题</h1>
<p>一个段落</p>
</body>
</html>